<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>朝闻天下后台管理</title>

    <link rel="icon" href="/zwtx/public/images/tx.ico" type="image/x-icon" style="width: 50px;height: 50px"/>
<link rel="stylesheet" href="/zwtx/Public/assets_h/stylesheets/bootstrap.min.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/zwtx/Public/assets_h/stylesheets/font-awesome.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/zwtx/Public/assets_h/stylesheets/se7en-font.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/zwtx/Public/assets_h/stylesheets/style.css" media="all" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/zwtx/Public/assets_h/stylesheets/theme.css" media="all" rel="stylesheet" type="text/css" />



<script src="/zwtx/Public/assets_h/javascripts/jquery.min.js" type="text/javascript"></script>
<script src="/zwtx/Public/assets_h/javascripts/jquery-ui.js" type="text/javascript"></script>
<script src="/zwtx/Public/assets_h/javascripts/bootstrap.min.js" type="text/javascript"></script>
<script src="/zwtx/Public/assets_h/javascripts/modernizr.custom.js" type="text/javascript"></script>
<script src="/zwtx/Public/assets_h/javascripts/main.js" type="text/javascript"></script>





    <link href="/zwtx/Public/assets_h/stylesheets/datepicker.css" media="all" rel="stylesheet" type="text/css"/>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.bootstrap.wizard.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/fullcalendar.min.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.dataTables.min.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.easy-pie-chart.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.isotope.min.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.fancybox.pack.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/select2.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.inputmask.min.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.validate.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/bootstrap-fileupload.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/bootstrap-datepicker.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/bootstrap-timepicker.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/daterange-picker.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/date.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/jquery.sparkline.min.js" type="text/javascript"></script>
    <script src="/zwtx/Public/assets_h/javascripts/main.js" type="text/javascript"></script>

    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">

</head>
<body class="no-skin">
<div class="navbar navbar-fixed-top" style="background-color: #3f82dc">
    <div class="container-fluid top-bar">
        <div class="pull-right">
            <?php if(is_array($admin)): $i = 0; $__LIST__ = $admin;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><ul class="nav navbar-nav pull-right">
                <li class="dropdown user hidden-xs"><a data-toggle="dropdown" class="dropdown-toggle" href="#">
                    <img width="34" height="34" src="/zwtx/Public/images/pic/<?php echo ($vo["ad_pic"]); ?>">
                   <!-- <span><?php echo ($vo['adminname']); ?></span>-->
                    <b class="caret"></b></a>
                    <ul class="dropdown-menu">

                        <li><a href="<?php echo U('Admin/ChangePassword/index');?>">
                            <i class="icon-gear"></i>修改密码</a>
                        </li>
                        <li><a href="<?php echo U('Admin/Login/loginout');?>">
                            <i class="icon-signout"></i>退出登录</a>
                        </li>

                    </ul>
                </li>

            </ul><?php endforeach; endif; else: echo "" ;endif; ?>
        </div>
        <a href="<?php echo U('Home/Index/index');?>">
            <!--<img width="150px" id="logo_header" alt="80x80" src="/zwtx/Public/assets_h/images/zwtx.gif">-->
            <img src="/zwtx/public/images/logo/1.png" width="170" height="45" alt="80x80" id="logo_header">
        </a>
      <!--  <img  src="/zlnews/Public/assets_h/images/zwtx.gif" alt="caffe" width="120" height="120">-->
    </div>

</div>


<div id="wrap" style="margin-bottom: 60px">
    <div class="container-fluid">
        <!-- Side menu -->

<div class=" nav-collapse-my collapse-my">
    <div class="user_side clearfix">
        <!--<img src="/zwtx/Public/assets_a/img/odinn.png" alt="">-->
        <!--&lt;!&ndash;<h5 align="">Admin</h5>&ndash;&gt;-->
        <a href="<?php echo U('Home/CourseHome/index');?>?unitNum=<?php echo (session('cid')); ?>" style="font-size: 20px"><?php echo ($model['course']['name']); ?></a>

    </div>
    <div class="accordion" >


        <div class="accordion-group-my">
            <div class="accordion-heading-my">
                <a class="" data-toggle="collapse" data-parent="#accordion2" href="#collapse_shiti"><i class="icon-reorder"></i> <span>新闻类别</span></a>
            </div>
            <div id="collapse_shiti" class="accordion-body collapse">
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/Type/addtype');?>"><i class="icon-table"></i> 添加新闻类别</a>
                </div>
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/Type/index');?>"><i class="icon-table"></i> 查询新闻类别</a>
                </div>

            </div>
        </div>
        <div class="accordion-group-my">
            <div class="accordion-heading-my">
                <a class="" data-toggle="collapse" data-parent="#accordion2" href="#collapsekaoqin"><i class="icon-reorder"></i> <span>用户信息</span></a>
            </div>
            <div id="collapsekaoqin" class="accordion-body collapse">
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/User/index');?>"><i class="icon-table"></i> 查询用户</a>
                </div>
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/User/edituser');?>"><i class="icon-table"></i> 添加用户</a>
                </div>
            </div>

        </div>

        <div class="accordion-group-my">
            <div class="accordion-heading-my">
                <a class="" data-toggle="collapse" data-parent="#accordion2" href="#collapse_xuesheng"><i class="icon-reorder"></i> <span>新闻信息</span></a>
            </div>
            <div id="collapse_xuesheng" class="accordion-body collapse">
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/News/addnews');?>"><i class="icon-table"></i> 添加新闻信息</a>
                </div>
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/News/index');?>"><i class="icon-table"></i> 查询新闻信息</a>
                </div>
            </div>
        </div>


        <div class="accordion-group-my">
            <div class="accordion-heading-my">
                <a class="" data-toggle="collapse" data-parent="#accordion2" href="#collapse_tongji"><i class="icon-reorder"></i> <span>新闻管理</span></a>
            </div>
            <div id="collapse_tongji" class="accordion-body collapse">
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/Satus/index');?>"><i class="icon-table"></i> 审核新闻</a>
                </div>
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/Top/index');?>"><i class="icon-table"></i> 置顶新闻</a>
                </div>
                <div class="accordion-inner-my" style="background-color:#1AB4FE;height: 40px">
                    <a class="accordion-toggle-my" href="<?php echo U('index.php/Admin/News/fabulous');?>"><i class="icon-table"></i> 点赞管理</a>
                </div>
            </div>
        </div>
        <div class="accordion-group-my">
            <div class="accordion-heading-my">
                <a  href="<?php echo U('index.php/Admin/Comments/index');?>"><i class="icon-reorder"></i> <span>留言管理</span></a>
            </div>

        </div>
        <div class="accordion-group-my">
            <div class="accordion-heading-my">

                <a class="" href="<?php echo U('index.php/Admin/Feedback/index');?>"><i class="icon-reorder"></i> <span>反馈管理</span></a>

            </div>

        </div>
        <div class="accordion-group-my">
            <div class="accordion-heading-my">

                <a class="" href="<?php echo U('index.php/Admin/Fourm/index');?>"><i class="icon-reorder"></i> <span>论坛管理</span></a>

            </div>

        </div>
    </div>
</div>
<!-- /Sid menu -->
        <div class="col-md-10 col-md-offset-2 " style="margin-bottom: 30px">
            <h2 style="color: #56abe4; margin-bottom: 0px;padding-bottom: 0px;">
                <p class="bg-white" style="font-weight:bold;margin-bottom: 10px;margin-top: 10px;font-size: 30px">修改新闻信息</p>
            </h2>
            <hr>
        </div>

        <div class="col-md-12  col-md-offset-3" style="">
            <div class="row">
                <div class="col-md-1"></div>
                <div class="col-md-5 col-md-offset-1" style="border: solid 1px #d3d8cf;border-radius: 5%">
                    <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><form  method="post"  class="form-horizontal" action="<?php echo U('News/reset');?>?id=<?php echo ($vo['id']); ?>"  enctype="multipart/form-data" >
                            <table class="table"  style="width: 100%"   >
                                <br><br>
                                <input type="hidden" name="id" value="<?php echo ($vo["id"]); ?>">
                                <tr>
                                    <img src="/zwtx/Public/images/pic/<?php echo ($vo["n_pic"]); ?>" style="border-radius:50% ; width:50px;height: 50px;" alt="空">
                                    <br>
                                </tr>
                                <tr>
                                    <td style="text-align: right; " > 类别名:</td>
                                    <td style="padding-right: 20%">
                                        <select class="form-control" name="tid" required>
                                            <option value="0"><?php echo ($vo['tid']); ?></option>
                                            <option value="1">体育</option>
                                            <option value="2">时政</option>
                                            <option value="3">娱乐</option>
                                            <option value="4">科技</option>
                                            <option value="5">军事</option>
                                            <option value="6">游戏</option>
                                            <option value="7">视频</option>
                                        </select>
                                    </td>

                                </tr>
                                <tr>
                                    <td style="text-align: right;"> 标题:</td>
                                    <td style="padding-right: 20%" ><input class="form-control" placeholder="<?php echo ($vo['title']); ?>" type="text" name="title" id="title" value="<?php echo ($vo['title']); ?>"></td>

                                </tr>
                                <tr>
                                    <td style="text-align: right;"> 内容:</td>
                                    <td style="padding-right: 20%" >
                                    <textarea class="form-control" rows="6" type="text" name="content" id="content" placeholder="<?php echo ($vo['content']); ?>" value="<?php echo ($vo['content']); ?>">
                                        <?php echo ($vo['content']); ?>
                                    </textarea>
                                    </td>

                                </tr>
                                <tr>
                                    <td style="text-align: right;"> 状态:</td>
                                    <td style="padding-right: 20%"><?php if(($vo["satus"] == 1)): ?>通过<?php else: ?>未通过<?php endif; ?></td>
                                </tr>

                                <tr>
                                    <td style="text-align: right;"> 发布人:</td>
                                    <td style="padding-right: 20%" ><input class="form-control" placeholder="<?php echo ($vo['username']); ?>" type="text" name="adduser" id="adduser" value="<?php echo ($vo['username']); ?>"></td>

                                </tr>
                                <tr>
                                    <td style="text-align: right;"> 置顶:</td>
                                    <td style="padding-right: 20%"><?php if(($vo["top"] == 1)): ?>置顶<?php else: ?>未置顶<?php endif; ?></td>
                                </tr>
                                <!--<tr>-->
                                    <!--<td style="text-align: right;"> 新闻图片:</td>-->
                                    <!--<td style="padding-right: 20%" > <input class="form-control" placeholder="<?php echo ($vo['pic']); ?>" type="file" name="pic" id="pic" required></td>-->

                                <!--</tr>-->

                                <tr>
                                    <td style="text-align: left;padding-left: 20%"> 新闻图片:</td>
                                    <td style="padding-right: 20%" >
                                        <!--<input class="form-control" placeholder="<?php echo ($vo['pic']); ?>" type="file" name="pic" id="pic" required>-->
                                        <div class="row" style="margin-top: 2%">
                                            <div class=" col-md-6 col-md-offset-0">
                                                <div class="fileupload fileupload-new" data-provides="fileupload" style=""><input type="hidden" value="" name="pic" >
                                                    <div class="fileupload-new img-thumbnail"
                                                         style="width: 110px; height: 110px;background-color:#5f5f5f">
                                                        <img src="">
                                                    </div>
                                                    <div class="fileupload-preview fileupload-exists img-thumbnail"
                                                         style="width: 110px; max-height: 110px;"></div>


                    <span class="btn btn-default btn-file">
                        <span class="fileupload-new">选择</span>
                        <span class="fileupload-exists">重选</span><input type="file" name="pic">
                   </span>
                                                    <span style="float: left"><a class="btn btn-default fileupload-exists" data-dismiss="fileupload" href="#">撤销</a></span>
                                                </div>
                                            </div>
                                        </div>
                                    </td>

                                </tr>


                                <tr style="height: 120px;">
                                    <div> <td colspan="2" style=";padding-left: 40%;" >
                                        <input style="width: 30%" class="btn btn-block btn-info "  type="submit" value="修改">
                                        <a href="<?php echo U('News/index');?>" >
                                            <button type="button" class="btn btn-success" style="width: 30%">返回</button>
                                        </a>
                                    </td></div>
                                </tr>
                            </table>
                        </form><?php endforeach; endif; else: echo "" ;endif; ?>

                </div>
                <div class="col-md-1">

                </div>
            </div>











        </div>


    </div>
</div>
</body>
</html>